import Vue from "vue";
import Vuex from "vuex";
// 1 引入vuex的持久化插件
import persistence from "vuex-uniapp-persistence";

// 引入其他的模块
import user from "./user";
import address from "./address";

Vue.use(Vuex);
const store = new Vuex.Store({
  state: {
    safeArea: uni.getWindowInfo().safeArea,
    capsule: uni.getMenuButtonBoundingClientRect()
  },
  getters: {},
  mutations: {

  },
  modules: {
    user,
    address
  },
  //使用持久化插件
  plugins: [persistence()]
});
export default store;


